set(WIFI_SSID "${WIFI_SSID}" CACHE INTERNAL "WiFi SSID for examples")
set(WIFI_PASSWORD "${WIFI_PASSWORD}" CACHE INTERNAL "WiFi password for examples")

add_subdirectory(blink)
add_subdirectory(wifi_scan)
add_subdirectory(access_point)

if ("${WIFI_SSID}" STREQUAL "")
    message("Skipping some Pico W examples as WIFI_SSID is not defined")
elseif ("${WIFI_PASSWORD}" STREQUAL "")
    message("Skipping some Pico W examples as WIFI_PASSWORD is not defined")
else()
    add_subdirectory(iperf)
    add_subdirectory(ntp_client)
    add_subdirectory(tcp_client)
    add_subdirectory(tcp_server)
    add_subdirectory(freertos)
    add_subdirectory(udp_beacon)

    if (NOT PICO_MBEDTLS_PATH)
        message("Skipping tls examples as PICO_MBEDTLS_PATH is not defined")
    else()
        add_subdirectory(tls_client)
    endif()
endif()
